function commonAjaxSubmit(url,formObj){if(!formObj||formObj==''){var formObj="form";} if(!url||url==''){var url=$(formObj).attr('action')}else{var url=document.URL;} $(formObj).ajaxSubmit({url:url,type:"POST",dataType:'json',success:function(data,st){if(data.status==1){popup.success(data.info);}else{popup.error(data.info);setTimeout(function(){popup.close("asyncbox_error");},2000);} if(data.url&&data.url!=''){setTimeout(function(){top.window.location.href=data.url;},2000);} if(data.url==''){setTimeout(function(){top.window.location.reload();},1000);}}});return false;} function getBodySize(get){var bodySize=[];bodySize['w']=($(document.body).width()>$(window).width())?$(document.body).width():$(window).width();bodySize['h']=($(document.body).height()>$(window).height())?$(document.body).height():$(window).height();return get?bodySize[get]:bodySize;} function isEmail(value){var Reg=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;return Reg.test(value);} function isEmailAndMessage(objId,errorId,info){if(isEmpty(objId,errorId,"误入邮件地址Q?)){return true;} if(!isEmail($(objId).val())){$(errorId).html(info);return true;}else{$(errorId).html("");} return false;} function isEmpty(objId,errorId,info){if($(objId).val()==""||$(objId).val()==null){$(errorId).html(info);return true;}else{$(errorId).html("");return false;}} function isCardNo(inputString,error) {var partten=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;if(partten.test(inputString)){$(error).html('');return true;}else{$(error).html('w䆾证输入不合法Q?);return false;}} function equality(objId,objId2,errorId,errorId2,info){if($(objId).val()==$(objId2).val()){$(errorId).html("");$(errorId2).html("");}else{$(errorId2).html(info);return true;}} function noChoice(objId,errorId,info){var list=$("input:radio[name='"+objId+"']:checked").val();if(list==null){$(errorId).html(info);return true;} else{$(errorId).html("");}} function isLessThanZero(objId,errorId,info){if($(objId).val()<0){$(errorId).html(info);$(objId).focus();return true;}else{$(errorId).html("");}} function isMobile(inputString,error){var partten=/^1[3,5,8]\d{9}$/;if(partten.test(inputString)){$(error).html('');return true;}else{$(error).html("误入正的手机LQ?);return false;}} function isPhone1(inpurStr,error){var partten=/(\d{3}-)(\d{8})$|(\d{4}-)(\d{7})$/;if(partten.test(inpurStr)){$(error).html('');return false;}else{$(error).html('误入正的电话LQ例如:0311-85907468?21-85907468格式');return false;}} function checkPwd(inpurStr,error){var str=/^[0-9a-zA-Z!$#%]{6,16}$/;if(str.test(inpurStr)){$(error).html('');return true;}else{$(error).html("误?-16位字W?字母/数字/!$#%)的密?);return false;}} function date(format,timestamp){var a,jsdate=((timestamp)?new Date(timestamp*1000):new Date());var pad=function(n,c){if((n=n+"").length>0},W:function(){var a=f.z(),b=364+f.L()-a;var nd2,nd=(new Date(jsdate.getFullYear()+"/1/1").getDay()||7)-1;if(b<=2&&((jsdate.getDay()||7)-1)<=2-b){return 1;}else{if(a<=2&&nd>=4&&a>=(6-nd)){nd2=new Date(jsdate.getFullYear()-1+"/12/31");return date("W",Math.round(nd2.getTime()/1000));}else{return(1+(nd<=3?((a+nd)/7):(a-(7-nd))/7)>>0);}}},F:function(){return txt_months[f.n()]},m:function(){return pad(f.n(),2)},M:function(){return f.F().substr(0,3)},n:function(){return jsdate.getMonth()+1},t:function(){var n;if((n=jsdate.getMonth()+1)==2){return 28+f.L();}else{if(n&1&&n<8||!(n&1)&&n>7){return 31;}else{return 30;}}},L:function(){var y=f.Y();return(!(y&3)&&(y%1e2||!(y%4e2)))?1:0},Y:function(){return jsdate.getFullYear()},y:function(){return(jsdate.getFullYear()+"").slice(2)},a:function(){return jsdate.getHours()>11?"pm":"am"},A:function(){return f.a().toUpperCase()},B:function(){var off=(jsdate.getTimezoneOffset()+60)*60;var theSeconds=(jsdate.getHours()*3600)+(jsdate.getMinutes()*60)+jsdate.getSeconds()+off;var beat=Math.floor(theSeconds/86.4);if(beat>1000)beat-=1000;if(beat<0)beat+=1000;if((String(beat)).length==1)beat="00"+beat;if((String(beat)).length==2)beat="0"+beat;return beat;},g:function(){return jsdate.getHours()%12||12},G:function(){return jsdate.getHours()},h:function(){return pad(f.g(),2)},H:function(){return pad(jsdate.getHours(),2)},i:function(){return pad(jsdate.getMinutes(),2)},s:function(){return pad(jsdate.getSeconds(),2)},O:function(){var t=pad(Math.abs(jsdate.getTimezoneOffset()/60*100),4);if(jsdate.getTimezoneOffset()>0)t="-"+t;else t="+"+t;return t;},P:function(){var O=f.O();return(O.substr(0,3)+":"+O.substr(3,2))},c:function(){return f.Y()+"-"+f.m()+"-"+f.d()+"T"+f.h()+":"+f.i()+":"+f.s()+f.P()},U:function(){return Math.round(jsdate.getTime()/1000)}};return format.replace(/[\\]?([a-zA-Z])/g,function(t,s){if(t!=s){ret=s;}else if(f[s]){ret=f[s]();}else{ret=s;} return ret;});} function clickCheckbox(){$(".chooseAll").click(function(){var status=$(this).prop('checked');$("tbody input[type='checkbox']").prop("checked",status);$(".chooseAll").prop("checked",status);$(".unsetAll").prop("checked",false);});$(".unsetAll").click(function(){var status=$(this).prop('checked');$("tbody input[type='checkbox']").each(function(){$(this).prop("checked",!$(this).prop("checked"));});$(".unsetAll").prop("checked",status);$(".chooseAll").prop("checked",false);});} function getcookie(name){var cookie_start=document.cookie.indexOf(name);var cookie_end=document.cookie.indexOf(";",cookie_start);return cookie_start==-1?'':unescape(document.cookie.substring(cookie_start+name.length+1,(cookie_end>cookie_start?cookie_end:document.cookie.length)));} function setcookie(cookieName,cookieValue,seconds,path,domain,secure){seconds=seconds?seconds:8400000;var expires=new Date();expires.setTime(expires.getTime()+seconds);document.cookie=escape(cookieName)+'='+escape(cookieValue) +(expires?'; expires='+expires.toGMTString():'') +(path?'; path='+path:'/') +(domain?'; domain='+domain:'') +(secure?'; secure':'');};var dialog=null;if(frameElement){dialog=frameElement.api;} var Menus=new Array();var is_ie=document.all;var Loading='L候,正在处理...';function confirmOper(url,title){e=is_ie?event:(confirmOper.caller?confirmOper.caller.arguments[0]:null);if(!title)title='您确定要q行此操作?';popup.confirm(title,'pȝ提示',function(action){if(action=='ok'){top.window.location.href=url;}});_cancelBubble(e);} function ajaxmenu(url,title,recall,modal,display) {if(!title)title='pȝ提示';e=is_ie?event:(ajaxmenu.caller?ajaxmenu.caller.arguments[0]:null);_cancelBubble(e);if(display){closeallwindow();} if(!recall){recall=function(btnRes,cntWin,returnValue){}} var menuid=hash(url);url=escapeurl(url,'inajax=2&menuid='+menuid);addmenuid(menuid);popup.open({id:menuid,title:title,url:url,modal:modal?modal:true,callback:recall,onload:function(win){popup.close(menuid+'Loading');}},window);popup.html({id:menuid+'Loading',width:310,height:150,title:'信息提示',content:Loading});_cancelBubble(e);} function ajaxhtml(url,title,recall,modal,display,position) {e=is_ie?event:(ajaxhtml.caller?ajaxhtml.caller.arguments[0]:null);controlid=e==null?null:(is_ie?e.srcElement:e.target);if(display){closeallwindow();} var menuid=hash(url);url=escapeurl(url,'menuid='+menuid);addmenuid(menuid);ajaxget(url,null,null,function(s){asyncbox.html({id:menuid,title:title,modal:modal==null?true:modal==1?true:false,content:s.info,callback:recall});if(position==1&&controlid){var postop=$(controlid).position().top;postop=postop-$('#'+menuid).height()-5;$('#'+menuid).css({top:postop});}});_cancelBubble(e);} function ajaxpost(id,url,recall){e=is_ie?event:(ajaxpost.caller?ajaxpost.caller.arguments[0]:null);if(!id||id==''){return;} if(!url||url==''){var url=$('#'+id).attr('action')} if(!recall){recall=function(data,st){if(data.status==1){parent.popup.success(data.info);}else{parent.popup.error(data.info);setTimeout(function(){parent.popup.close("asyncbox_error");},2000);} if(data.url&&data.url!=''){setTimeout(function(){top.window.location.href=data.url;},2000);} if(data.url==''){setTimeout(function(){top.window.location.reload();},1000);}};} $('#'+id).ajaxSubmit({url:url,type:"POST",dataType:'json',success:recall});_cancelBubble(e);return false;} function ajaxget(url,showId,waitId,recall,async,inajax) {var e=is_ie?event:(ajaxget.caller==null?null:ajaxget.caller.arguments[0]);if($('#'+waitId))$('#'+waitId).html(Loading);if(!recall){recall=function(s){if(showId){if(showId==waitId){$('#'+showId).html(s.info);}else{$('#'+waitId).hide();$('#'+showId).html(s.info);}}}} async=async!=null?async?true:false:true;inajax=inajax!=null?inajax:1;url=escapeurl(url,'inajax='+inajax);$.ajax({type:'GET',url:url,dataType:'json',success:recall,async:async});_cancelBubble(e);} function _cancelBubble(e,returnValue){if(!e)return;try{if(is_ie){if(!returnValue&&e)e.returnValue=false;if(e)e.cancelBubble=true;}else{if(e.stopPropagation)e.stopPropagation();if(!returnValue&&e.preventDefault)e.preventDefault();}}catch(e){alert('_cancelBubble:'+e.message)}} function closewindow(menuid){if(menuid){parent?parent.popup.close(menuid):popup.close(menuid);}else{dialog.close();}} function closeallwindow(){$.each(Menus,function(k,v){closewindow(v);});} function hash(string,length){var length=length?length:32;var start=0;var i=0;var result='';filllen=length-string.length%length;for(i=0;i").get(0).files!==undefined;feature.formdata=window.FormData!==undefined;$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;} var method,action,url,$form=this;if(typeof options=='function'){options={success:options};} method=this.attr('method');action=this.attr('action');url=(typeof action==='string')?$.trim(action):'';url=url||window.location.href||'';if(url){url=(url.match(/^([^#]+)/)||[])[1];} options=$.extend(true,{url:url,success:$.ajaxSettings.success,type:method||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;} if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;} var traditional=options.traditional;if(traditional===undefined){traditional=$.ajaxSettings.traditional;} var elements=[];var qx,a=this.formToArray(options.semantic,elements);if(options.data){options.extraData=options.data;qx=$.param(options.data,traditional);} if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;} this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;} var q=$.param(a,traditional);if(qx){q=(q?(q+'&'+qx):qx);} if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;} else{options.data=q;} var callbacks=[];if(options.resetForm){callbacks.push(function(){$form.resetForm();});} if(options.clearForm){callbacks.push(function(){$form.clearForm(options.includeHidden);});} if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});} else if(options.success){callbacks.push(options.success);} options.success=function(data,status,xhr){var context=options.context||this;for(var i=0,max=callbacks.length;i0;var mp='multipart/form-data';var multipart=($form.attr('enctype')==mp||$form.attr('encoding')==mp);var fileAPI=feature.fileapi&&feature.formdata;log("fileAPI :"+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;var jqxhr;if(options.iframe!==false&&(options.iframe||shouldUseFrame)){if(options.closeKeepAlive){$.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a);});} else{jqxhr=fileUploadIframe(a);}} else if((hasFileInputs||multipart)&&fileAPI){jqxhr=fileUploadXhr(a);} else{jqxhr=$.ajax(options);} $form.removeData('jqxhr').data('jqxhr',jqxhr);for(var k=0;k');$io.css({position:'absolute',top:'-1000px',left:'-1000px'});} io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;try{if(io.contentWindow.document.execCommand){io.contentWindow.document.execCommand('Stop');}} catch(ignore){} $io.attr('src',s.iframeSrc);xhr.error=e;if(s.error) s.error.call(s.context,xhr,e,status);if(g) $.event.trigger("ajaxError",[xhr,s,e]);if(s.complete) s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&0===$.active++){$.event.trigger("ajaxStart");} if(g){$.event.trigger("ajaxSend",[xhr,s]);} if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global){$.active--;} deferred.reject();return deferred;} if(xhr.aborted){deferred.reject();return deferred;} sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type=="image"){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}} var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=frame.contentWindow?frame.contentWindow.document:frame.contentDocument?frame.contentDocument:frame.document;return doc;} var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;} function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(!method){form.setAttribute('method','POST');} if(a!=s.url){form.setAttribute('action',s.url);} if(!s.skipEncodingOverride&&(!method||/post/i.test(method))){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});} if(s.timeout){timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);} function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state&&state.toLowerCase()=='uninitialized') setTimeout(checkState,50);} catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);if(timeoutHandle) clearTimeout(timeoutHandle);timeoutHandle=undefined;}} var extraInputs=[];try{if(s.extraData){for(var n in s.extraData){if(s.extraData.hasOwnProperty(n)){if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value')){extraInputs.push($('').val(s.extraData[n].value).appendTo(form)[0]);}else{extraInputs.push($('').val(s.extraData[n]).appendTo(form)[0]);}}}} if(!s.iframeTarget){$io.appendTo('body');if(io.attachEvent) io.attachEvent('onload',cb);else io.addEventListener('load',cb,false);} setTimeout(checkState,15);var submitFn=document.createElement('form').submit;submitFn.apply(form);} finally{form.setAttribute('action',a);if(t){form.setAttribute('target',t);}else{$form.removeAttr('target');} $(extraInputs).remove();}} if(s.forceSync){doSubmit();} else{setTimeout(doSubmit,10);} var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed){return;} try{doc=getDoc(io);} catch(ex){log('cannot access response document: ',ex);e=SERVER_ABORT;} if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');deferred.reject(xhr,'timeout');return;} else if(e==SERVER_ABORT&&xhr){xhr.abort('server abort');deferred.reject(xhr,'error','server abort');return;} if(!doc||doc.location.href==s.iframeSrc){if(!timedOut) return;} if(io.detachEvent) io.detachEvent('onload',cb);else io.removeEventListener('load',cb,false);var status='success',errMsg;try{if(timedOut){throw'timeout';} var isXml=s.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML)){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}} var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml) s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;} var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;} else if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre){xhr.responseText=pre.textContent?pre.textContent:pre.innerText;} else if(b){xhr.responseText=b.textContent?b.textContent:b.innerText;}}} else if(dt=='xml'&&!xhr.responseXML&&xhr.responseText){xhr.responseXML=toXml(xhr.responseText);} try{data=httpData(xhr,dt,s);} catch(e){status='parsererror';xhr.error=errMsg=(e||status);}} catch(e){log('error caught: ',e);status='error';xhr.error=errMsg=(e||status);} if(xhr.aborted){log('upload aborted');status=null;} if(xhr.status){status=(xhr.status>=200&&xhr.status<300||xhr.status===304)?'success':'error';} if(status==='success'){if(s.success) s.success.call(s.context,data,'success',xhr);deferred.resolve(xhr.responseText,'success',xhr);if(g) $.event.trigger("ajaxSuccess",[xhr,s]);} else if(status){if(errMsg===undefined) errMsg=xhr.statusText;if(s.error) s.error.call(s.context,xhr,status,errMsg);deferred.reject(xhr,'error',errMsg);if(g) $.event.trigger("ajaxError",[xhr,s,errMsg]);} if(g) $.event.trigger("ajaxComplete",[xhr,s]);if(g&&!--$.active){$.event.trigger("ajaxStop");} if(s.complete) s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout) clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget) $io.remove();xhr.responseXML=null;},100);} var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);} else{doc=(new DOMParser()).parseFromString(s,'text/xml');} return(doc&&doc.documentElement&&doc.documentElement.nodeName!='parsererror')?doc:null;};var parseJSON=$.parseJSON||function(s){return window['eval']('('+s+')');};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=type==='xml'||!type&&ct.indexOf('xml')>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror'){if($.error) $.error('parsererror');} if(s&&s.dataFilter){data=s.dataFilter(data,type);} if(typeof data==='string'){if(type==='json'||!type&&ct.indexOf('json')>=0){data=parseJSON(data);}else if(type==="script"||!type&&ct.indexOf("javascript")>=0){$.globalEval(data);}} return data;};return deferred;}};$.fn.ajaxForm=function(options){options=options||{};options.delegation=options.delegation&&$.isFunction($.fn.on);if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;} log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;} if(options.delegation){$(document).off('submit.form-plugin',this.selector,doAjaxSubmit).off('click.form-plugin',this.selector,captureSubmittingElement).on('submit.form-plugin',this.selector,options,doAjaxSubmit).on('click.form-plugin',this.selector,options,captureSubmittingElement);return this;} return this.ajaxFormUnbind().bind('submit.form-plugin',options,doAjaxSubmit).bind('click.form-plugin',options,captureSubmittingElement);};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(this).ajaxSubmit(options);}} function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!($el.is("[type=submit],[type=image]"))){var t=$el.closest('[type=submit]');if(t.length===0){return;} target=t[0];} var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!==undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}} setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);} $.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic,elements){var a=[];if(this.length===0){return a;} var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els){return a;} var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i=0&&(c=c.substr(0,c.indexOf("#"))),c.indexOf("?")>=0&&(c=c.substr(0,c.indexOf("?"))),c+d.search+(d.search?"&"+b:"?"+b)+d.hash} return a.url} function i(b){j(a.extend({title:"操作提示",content:"",top:-1,right:-1,bottom:-1,left:-1,width:"auto",height:"auto",args:!1,node:{},wrap:!1,"float":!1,timer:!1,ctrlbar:{close:!0},buttons:!1,pageMode:!1,htmlMode:!1,inputMode:!1,drag:!0,cache:!1,fixed:!1,reset:!1,flash:!1,modal:!1,scroll:!0,onload:a.noop,unload:a.noop,callback:a.noop},b))} function j(b){a(function(){if($){var d=b.id,e=c(d);m(b);if(e){e.style.zIndex=D.zIndex++;if(typeof b.content=="object"){var f=b.content,g=c(b.id+"_content");a.each(L,function(a,c){c.id==b.id&&(c.wrap={key:f,value:f.innerHTML},g.innerHTML=c.wrap.value,f.innerHTML="")})} a(e).show()}else{a(Q).append("
'+n(b)+"
"),b.abo=a("#"+d)[0];var h=0,i,j=b.abo.getElementsByTagName("*"),l=j.length;for(;hr&&(u=r),vp&&(v=p),v':"",'',"","",'','','',"","",'','",'',"","",'','','',"","","
',a.title?'
'+a.title+(a.ctrlbar.close?'':"")+" 
":"",a.pageMode?"":a.inputMode?'
'+"
    "+"
  • "+a.inputMode.tips+"
  • "+"
  • "+(a.textType=="text"?'':"")+(a.textType=="textarea"?'":"")+(a.textType=="password"?'':"")+"
  • "+"
"+"
":a.htmlMode?'
'+o(a)+"
":'
'+a.content+"
",a.pageMode?'':"",a.buttons?'
'+r(a)+"
":"","
"].join("")} function o(a){var b=a.content;return typeof b=="object"&&b?(a.wrap={key:b,value:b.innerHTML},b.innerHTML="",a.wrap.value):b} function p(a){a.wrap&&(a.wrap.key.innerHTML=a.wrap.value,a.wrap=!1)} function q(b,c){a(b).animate(c,300,function(){Y&&c.fixed&&e(b)})} function r(b){if(b.buttons){var c=[];return a.each(b.buttons,function(a,d){c.push(' ',d.value," ")}),c.join("")}} function s(b){b.inputMode?a("#"+b.id+"_Text").focus().select():b.buttons&&a("#"+b.id+"_btnsbar").find("a")[0].focus()} function t(b){var d,e=D.btn.CLOSE.concat(b.buttons);a.each(e,function(e,f){a("#"+b.id+"_"+f.result).click(function(e){var g=a(this);return g.attr("disabled","disabled"),b.inputMode?d=b.callback(f.result,c(b.id+"_Text").value):b.pageMode?D.opener(b.id)?d=b.callback(f.result,D.opener(b.id),b.abo.returnValue):d=!0:b.htmlMode?d=b.callback(f.result,b.abo.returnValue):d=b.callback(f.result),(typeof d=="undefined"||d)&&D.close(b.id),g.removeAttr("disabled"),e.preventDefault(),!1})})} function u(a){var b=c(a+"_content");if(b){try{var d=E.contentWindow.document;d.write(""),d.clear(),d.close()}catch(e){} b.src="about:blank"}} function v(a){x(a),z(a)} function w(b){if(b.pageMode){var c=a("#"+b.id+"_content"),d=c[0],e=b.abo;e.options=b,e.data=b.data,e.opener=b.opener||window,e.close=function(){D.close(this.id)},e.join=function(a){return D.opener(a)},e.buttons=b.buttons?a("#"+b.id+"_btnsbar").find("a"):"undefined",d.api=e,c.one("load",function(){try{if(b.width=="auto"&&b.height=="auto"){var c=a(this).contents();asyncbox.resizeTo(b.id,c.width(),c.height())} b.onload(d.contentWindow)}catch(e){}})}else b.htmlMode&&b.onload()} function x(b){var e=b.id,f=c(e),g=f.style,h=d(),i=a("#"+e+"_content");b.pageMode||b.htmlMode?(typeof b.width=="number"&&i.width(b.width),typeof b.height=="number"&&i.height(b.height),typeof b.width=="string"&&b.width!="auto"&&i.width(parseInt(b.width)-f.offsetWidth+i[0].offsetWidth),typeof b.height=="string"&&b.height!="auto"&&i.height(parseInt(b.height)-f.offsetHeight+i[0].offsetHeight)):f.offsetWidthD.maxWidth&&i.width(D.maxWidth-f.offsetWidth+i.outerWidth())} function y(a,b){var c=a.abo,f=c.style,g,h,i,j=d(),k=c.offsetWidth,l=c.offsetHeight,m=j.top,n=j.left,o=j.width,p=j.height;a.center?i=(p-l)/2:i=l>p/2?(p-l)/2:p*.382-l/2,!Y&&a.fixed?(g=i,h=(o-k)/2,a.top>=0&&(g=a.top),a.left>=0&&(h=a.left),a.right>=0&&(h=o-k-a.right),a.bottom>=0&&(g=p-l-a.bottom),g=g<0?0:g,h=h<0?0:h):(g=m+i,h=n+(o-k)/2,a.top>=0&&(g=m+a.top),a.left>=0&&(h=n+a.left),a.right>=0&&(h=n+o-k-a.right),a.bottom>=0&&(g=m+p-l-a.bottom),g=g0&&!H&&(a(E).bind("resize",bb),H=!0)} function B(b,c,d){return a.grep(b,function(a){return d?a[d]!=c:a!=c})} function C(a,b,c,d){var e=G+d,f={id:e,icon:e,title:b,reset:!0,modal:!0,content:a,callback:c};if(d=="alert"||"success"||"error")f.buttons=D.btn.OK;switch(d){case"confirm":f.buttons=D.btn.OKCANCEL;break;case"warning":f.buttons=D.btn.YESNOCANCEL} i(f)} var D=asyncbox,E=window,F=document,G="asyncbox_",H=!1,I=!1,J=[],K=[],L=[],M=[],N=F.documentElement,O,P=document.createElement("link"),Q=document.createElement("licai"),R=document.createElement("ab_skins"),S=document.createElement("ab_modal"),T=document.createElement("ab_clone"),U=document.createElement("ab_cover"),V=N.clientWidth,W=N.clientHeight,X=!!E.ActiveXObject,Y=X&&!E.XMLHttpRequest,Z,$=function(a,b,c,d){c=a.length;for(;b=0)break} return d=d.split("?"),Z=d[1],d[0].substr(0,d[0].lastIndexOf("/")+1)||!1}(document.getElementsByTagName("script"),0),_=function(a){if(Z){var b=Z.split("&"),c=0,d=b.length,e;for(;c
  • ",R.style.cssText="position:absolute;top:-5000px;left:-5000px",S.style.cssText=cb,S.setAttribute("unselectable","on"),S.onmousedown=function(){return!1},T.style.cssText="position:absolute;z-index:"+(D.zIndex+900)+";display:none",U.style.cssText=cb+"cursor:move;background:#fff;opacity:0;filter:alpha(opacity=0);z-index:"+(D.zIndex+1e3),a(function(){if(!document.getElementsByTagName("frameset").length){try{Y&&document.execCommand("BackgroundImageCache",!1,!0)}catch(a){} if(Y&&document.body.currentStyle["backgroundAttachment"]!="fixed"){var b=document.getElementsByTagName("html")[0];b.style.cssText="background-image:url(about:blank);background-attachment:fixed"} document.body.appendChild(f(R,S,T,U)),D.inFrame&&Y&&(S.innerHTML='
    '),Y&&e(R)}})} var bb=function(){if(V!=N.clientWidth||W!=N.clientHeight)V=N.clientWidth,W=N.clientHeight,a.each(M,function(a){var b={},d=M[a];b.abo=c(d.id),b.id=d.id,b.top=d.top,b.left=d.left,b.right=d.right,b.bottom=d.bottom,D.Flash&&d.flash?y(b,!0):y(b,!1)})};D.btn={OK:[{value:D.Language.OK,result:"ok"}],NO:[{value:D.Language.NO,result:"no"}],YES:[{value:D.Language.YES,result:"yes"}],CLOSE:[{title:D.Language.CLOSE,result:"close"}],CANCEL:[{value:D.Language.CANCEL,result:"cancel"}]},D.btn.OKCANCEL=D.btn.OK.concat(D.btn.CANCEL),D.btn.YESNO=D.btn.YES.concat(D.btn.NO),D.btn.YESNOCANCEL=D.btn.YES.concat(D.btn.NO).concat(D.btn.CANCEL),D.cover=function(b,c){var d=a(S),e=S.style;b?(I=b,e.zIndex=c||D.zIndex,D.Flash?d.fadeTo(500,D.Cover.opacity):d.show()):(I=b,D.Flash?d.fadeOut(300):d.hide(),J=[])},D.close=function(d){var e=c(d);e&&(M.length>0&&(M=B(M,d,"id")),H&&M.length==0&&(a(E).unbind("resize",bb),H=!1,M=[]),a.each(L,function(f,g){if(g.id==d){if(I)for(b in K)K[b]==d&&(K=B(K,d),J.length>1&&K.length!=0?(J.pop(),D.cover(!0,J[J.length-1])):D.cover(!1));g.wrap&&(c(g.id+"_content").innerHTML="",p(g)),g.timeobj=null,g.cache?a(e).hide():(L.length>0&&(L=B(L,d,"id")),g.pageMode&&u(d),a(e).remove()),g.unload()}}))},D.resizeTo=function(b,d,f){var g=c(b);(g&&g.offsetWidth!=d||g.offsetHeight!=f)&&a.each(L,function(a,c){if(c.id==b){var h={abo:g,id:b,width:d,height:f,top:c.top,left:c.left,right:c.right,bottom:c.bottom,pageMode:c.pageMode,htmlMode:c.htmlMode};x(h),y(h,!1),c.fixed&&e(g)}})},D.framer=function(a){return c(a).contentWindow},D.opener=function(a){return D.framer(a+"_content")},D.reload=function(a,b){var d=c(a+"_content");try{d.src=b||D.opener(a).location.href}catch(e){d.src=d.src}},D.exist=function(a){var b=c(a);return b&&b.style.display!="none"?!0:!1},D.alert=function(a,b,c){C(a,b,c,"alert")},D.confirm=function(a,b,c){C(a,b,c,"confirm")},D.prompt=function(a,b,c,d,e){var f={id:G+"prompt",title:a,reset:!0,modal:!0,inputMode:{tips:b||"",content:c||""},textType:d,buttons:D.btn.OKCANCEL,callback:e};i(f)},D.open=function(a,b){a.id=a.id||G+D.zIndex,a.content="",a.pageMode=!0,a.opener=b,i(a)},D.html=function(a){a.id=a.id||G+D.zIndex,a.url="",a.htmlMode=!0,i(a)},D.success=function(a,b,c){C(a,b,c,"success")},D.warning=function(a,b,c){C(a,b,c,"warning")},D.error=function(a,b,c){C(a,b,c,"error")}})(jQuery);